package org.apache.james.spring2;

import org.apache.james.container.spring.beanfactory.AvalonApplicationContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ApplicationContext parentContext = new ClassPathXmlApplicationContext("applicationContext.xml");

        Resource containerResource = new ClassPathResource("beans-base-config.xml");
        Resource applicationResource = new ClassPathResource("james-assembly.xml");
        AvalonApplicationContext context = new AvalonApplicationContext(parentContext, containerResource, applicationResource);

        ApplicationContext childContext = new ClassPathXmlApplicationContext( new String[] { "minaApplicationContext.xml" } , context);
        
/*		DbMailboxManager mailboxManager = (DbMailboxManager) context.getBean("mailboxManager");
		System.out.println("mailbox manager:"+mailboxManager);
		for (ContentRepository repo : mailboxManager.getRepositories())
			System.out.println("repo :"+repo.getId()+", "+repo.getPath());
*/
	}

}
